from flask import Flask
from flask_restful import Resource, Api

app = Flask(__name__)
api = Api(app)


class HelloResource(Resource):
    def get(self):
        return {"name":"lisi"}
    def post(self):
        return {"age":11}


api.add_resource(HelloResource, '/')

if __name__ == '__main__':
    app.run(debug=True)


